import sys,time
import os
import pandas as pd
from Predict_6623Job import Predict_6623Job

def main(create_date):
    result_list = []
    try:
        create_date = str(create_date)
        success_tmp = True
        msg = ''
        timestamp = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
    except Exception as e:
        success_tmp = False
        msg = f'invalid_parameter_type--{str(e)}'
        timestamp = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
    if success_tmp:
        msg, result_list = Predict_6623Job(p_create_date=create_date).execute()
        timestamp = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
        success_tmp = True
    success = success_tmp
    message = msg
    timestamp = timestamp
    table_1 = result_list
    return success, message, timestamp, table_1
if __name__ == '__main__':
    create_date = '20240101'
    success, message, timestamp, table_1 = main(create_date)
    print(table_1[0]['COKING_COKE_SULCONT'])
    print(table_1[1]['COKING_COKE_SULCONT'])
    print(success, message, timestamp, table_1)
